home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 6_11.lha / 6_11 / 6_11_pos.c < prev    next >
Text File  |  1993-08-08  |  412b  |  19 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. *
  6.    The unary plus operator on type arbint.
  7. /
  8. include <arbint.h>
  9.  
  10. rbint operator+(const arbint& j)
  11.  
  12.    int nlen = j.p->length;
  13.    ARB_type *nv = new ARB_type[nlen];
  14.    memcpy((char*)nv, (char*)j.p->value,
  15. nlen * sizeof(ARB_type));
  16.    arbint k(nv, nlen);
  17.    return k;
  18.  
  19.